package com.shop.cereshop.commons.domain.referral;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 代理商分润记录表实体类
 * 对应表：cere_agent_income_record
 */
@Data
@ApiModel(value = "CereAgentIncomeRecord", description = "代理商分润记录表")
@TableName("cere_agent_income_record")
public class CereAgentIncomeRecord {

  /**
   * 分润记录ID
   */
  @ApiModelProperty(value = "分润记录ID")
  @TableId(type = IdType.AUTO)
  private Long incomeId;

  /**
   * 代理商ID
   */
  @ApiModelProperty(value = "代理商ID")
  private Long agentUserId;

  /**
   * 订单ID
   */
  @ApiModelProperty(value = "订单ID")
  private Long orderId;

  /**
   * 店铺ID
   */
  @ApiModelProperty(value = "店铺ID")
  private Long shopId;

  /**
   * 店铺类型 1-线下门店 2-线上商户
   */
  @ApiModelProperty(value = "店铺类型 1-线下门店 2-线上商户")
  private String shopType;

  /**
   * 城市编码
   */
  @ApiModelProperty(value = "城市编码")
  private String cityCode;

  /**
   * 订单金额
   */
  @ApiModelProperty(value = "订单金额")
  private BigDecimal orderAmount;

  /**
   * 分润比例
   */
  @ApiModelProperty(value = "分润比例")
  private BigDecimal incomeRate;

  /**
   * 分润金额
   */
  @ApiModelProperty(value = "分润金额")
  private BigDecimal incomeAmount;

  /**
   * 结算状态 0-未结算 1-已结算
   */
  @ApiModelProperty(value = "结算状态 0-未结算 1-已结算")
  private Integer appliedState;

  /**
   * 结算时间
   */
  @ApiModelProperty(value = "结算时间")
  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
  private LocalDateTime appliedTime;

  /**
   * 创建时间
   */
  @ApiModelProperty(value = "创建时间")
  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
  private LocalDateTime createTime;
}
